home *** CD-ROM | disk | FTP | other *** search
- Path: news.production.compuserve.com!news
- From: Steve Farson <75226.1623@CompuServe.COM>
- Newsgroups: comp.lang.c++
- Subject: Array Summary Algorithm
- Date: 9 Apr 1996 21:02:50 GMT
- Organization: CompuServe, Inc. (1-800-689-0736)
- Message-ID: <4kej9q$fhf$1@mhadg.production.compuserve.com>
-
- Has anyone ever heard of, or seen an algorithm that can summarize
- the contents of an array. What I mean is this... if an array
- looks like this:
-
- New York 10
- Delaware 12
- New York 15
- Indiana 12
- Delaware 10
-
- Create a summary array from the preceeding to look like this:
- New York 25
- Delaware 22
- Indiana 12
-
- It would be similar to SQL GROUP BY, or the XBase TOTAL ON. I
- think it would be stimulating to come up with the code to do
- this. I may give it a try if I can find the time, but thought
- I'd ask here if anyone had some insight or advice or example on
- how to do this.
-
- Thanks for any thoughts. Steve
- Thanks for any thoughts.
-
- Steve
-